var router = require("express").Router();

var PF = require("../controllers/admin/page.factory");
var CommonUtils = require("../lib/common-utils");

router.all("/ajax/:type", CommonUtils.Common.RequestExtend, PF.Ajax.Service);

router.get("/", CommonUtils.Common.RequestExtend, PF.Master.Main(PF.Main.Index));
router.get("/main", CommonUtils.Common.RequestExtend, PF.Master.Main(PF.Main.Main, "", "{Index}"));

//region user-manage

router.get("/user-manage", CommonUtils.Common.RequestExtend, PF.Master.Main(PF.User_Manage.Main, "{User}"));

router.get("/user-manage/base-manage/user-list", CommonUtils.Common.RequestExtend, PF.Master.Main(PF.User_Manage.Base_Manage.User_List, "{User}[Base](List)"));
router.get("/user-manage/base-manage/user-info/:id", CommonUtils.Common.RequestExtend, PF.Master.Modal(PF.User_Manage.Base_Manage.User_Info, "{User}[Base](Info)"));
router.get("/user-manage/base-manage/user-edit/:id", CommonUtils.Common.RequestExtend, PF.Master.Modal(PF.User_Manage.Base_Manage.User_Edit, "{User}[Base](Edit)"));
router.get("/user-manage/base-manage/user-idcard-list", CommonUtils.Common.RequestExtend, PF.Master.Main(PF.User_Manage.Base_Manage.User_IDCard_List, "{User}[Base](IDCard-Approval)"));
router.get("/user-manage/base-manage/banktrade-list", CommonUtils.Common.RequestExtend, PF.Master.Main(PF.User_Manage.Base_Manage.BankTrade_List, "{User}[Base](BankTrade-List)"));
router.get("/user-manage/base-manage/packagetrade-list", CommonUtils.Common.RequestExtend, PF.Master.Main(PF.User_Manage.Base_Manage.PackageTrade_List, "{User}[Base](PackageTrade-List)"));
router.get("/user-manage/base-manage/login-list", CommonUtils.Common.RequestExtend, PF.Master.Main(PF.Base_Manage.Log_Manage.Login_List, "{Base}[Log](Login-List)", "{User}[Base](Login-List)"));
router.get("/user-manage/base-manage/operation-list", CommonUtils.Common.RequestExtend, PF.Master.Main(PF.Base_Manage.Log_Manage.User_Operation_List, "{Base}[Log](User-Operation-List)", "{User}[Base](Operation-List)"));

router.get("/user-manage/anchor-manage/list", CommonUtils.Common.RequestExtend, PF.Master.Main(PF.User_Manage.Anchor_Manage.List, "{User}[Anchor](List)"));
router.get("/user-manage/anchor-manage/info/:id", CommonUtils.Common.RequestExtend, PF.Master.Modal(PF.User_Manage.Anchor_Manage.Info, "{User}[Anchor](Info)"));
router.get("/user-manage/anchor-manage/edit/:id", CommonUtils.Common.RequestExtend, PF.Master.Modal(PF.User_Manage.Anchor_Manage.Edit, "{User}[Anchor](Edit)"));
router.get("/user-manage/anchor-manage/operation-list", CommonUtils.Common.RequestExtend, PF.Master.Main(PF.Base_Manage.Log_Manage.Anchor_Operation_List, "{Base}[Log](Anchor-Operation-List)", "{User}[Anchor](Operation-List)"));

router.get("/user-manage/family-manage/list", CommonUtils.Common.RequestExtend, PF.Master.Main(PF.User_Manage.Family_Manage.List, "{User}[Family](List)"));
router.get("/user-manage/family-manage/info/:id", CommonUtils.Common.RequestExtend, PF.Master.Modal(PF.User_Manage.Family_Manage.Info, "{User}[Family](Info)"));
router.get("/user-manage/family-manage/edit/:id", CommonUtils.Common.RequestExtend, PF.Master.Modal(PF.User_Manage.Family_Manage.Edit, "{User}[Family](Edit)"));
router.get("/user-manage/family-manage/banktrade-list", CommonUtils.Common.RequestExtend, PF.Master.Main(PF.User_Manage.Family_Manage.BankTrade_List, "{User}[Family](BankTrade-List)"));
router.get("/user-manage/family-manage/operation-list", CommonUtils.Common.RequestExtend, PF.Master.Main(PF.Base_Manage.Log_Manage.Family_Operation_List, "{Base}[Log](Family-Operation-List)", "{User}[Family](Operation-List)"));

router.get("/user-manage/admin-manage/list", CommonUtils.Common.RequestExtend, PF.Master.Main(PF.User_Manage.Admin_Manage.List, "{User}[Admin](List)"));
router.get("/user-manage/admin-manage/info/:id", CommonUtils.Common.RequestExtend, PF.Master.Modal(PF.User_Manage.Admin_Manage.Info, "{User}[Admin](Info)"));
router.get("/user-manage/admin-manage/edit/:id?", CommonUtils.Common.RequestExtend, PF.Master.Modal(PF.User_Manage.Admin_Manage.Edit, "{User}[Admin](Edit)"));
router.get("/user-manage/admin-manage/operation-list", CommonUtils.Common.RequestExtend, PF.Master.Main(PF.Base_Manage.Log_Manage.Admin_Operation_List, "{Base}[Log](Admin-Operation-List)", "{User}[Admin](Operation-List)"));

//endregion

//region order-manage

router.get("/order-manage", CommonUtils.Common.RequestExtend, PF.Master.Main(PF.Order_Manage.Main, "{Order}"));

router.get("/order-manage/room-manage/live-list", CommonUtils.Common.RequestExtend, PF.Master.Main(PF.Order_Manage.Room_Manage.Live_List, "{Order}[Room](Live-List)"));
router.get("/order-manage/room-manage/live-info/:id", CommonUtils.Common.RequestExtend, PF.Master.Modal(PF.Order_Manage.Room_Manage.Live_Info, "{Order}[Room](Live-Info)"));
router.get("/order-manage/room-manage/gift-list", CommonUtils.Common.RequestExtend, PF.Master.Main(PF.Order_Manage.Room_Manage.Gift_List, "{Order}[Room](Gift-List)"));
router.get("/order-manage/room-manage/gift-info/:id", CommonUtils.Common.RequestExtend, PF.Master.Modal(PF.Order_Manage.Room_Manage.Gift_Info, "{Order}[Room](Gift-Info)"));
router.get("/order-manage/room-manage/guardian-list", CommonUtils.Common.RequestExtend, PF.Master.Main(PF.Order_Manage.Room_Manage.Guardian_List, "{Order}[Room](Guardian-List)"));
router.get("/order-manage/room-manage/guardian-info/:id", CommonUtils.Common.RequestExtend, PF.Master.Modal(PF.Order_Manage.Room_Manage.Guardian_Info, "{Order}[Room](Guardian-Info)"));
router.get("/order-manage/room-manage/horn-list", CommonUtils.Common.RequestExtend, PF.Master.Main(PF.Order_Manage.Room_Manage.Horn_List, "{Order}[Room](Horn-List)"));
router.get("/order-manage/room-manage/horn-info/:id", CommonUtils.Common.RequestExtend, PF.Master.Modal(PF.Order_Manage.Room_Manage.Horn_Info, "{Order}[Room](Horn-Info)"));

router.get("/order-manage/other-manage/vip-list", CommonUtils.Common.RequestExtend, PF.Master.Main(PF.Order_Manage.Other_Manage.VIP_List, "{Order}[Other](VIP-List)"));
router.get("/order-manage/other-manage/vip-info/:id", CommonUtils.Common.RequestExtend, PF.Master.Modal(PF.Order_Manage.Other_Manage.VIP_Info, "{Order}[Other](VIP-Info)"));
router.get("/order-manage/other-manage/mounts-list", CommonUtils.Common.RequestExtend, PF.Master.Main(PF.Order_Manage.Other_Manage.Mounts_List, "{Order}[Other](Mounts-List)"));
router.get("/order-manage/other-manage/mounts-info/:id", CommonUtils.Common.RequestExtend, PF.Master.Modal(PF.Order_Manage.Other_Manage.Mounts_Info, "{Order}[Other](Mounts-Info)"));

router.get("/order-manage/admin-manage/anchorintegral-list", CommonUtils.Common.RequestExtend, PF.Master.Main(PF.Order_Manage.Admin_Manage.AnchorIntegral_List, "{Order}[Admin](AnchorIntegral-List)"));
router.get("/order-manage/admin-manage/anchorintegral-info/:id", CommonUtils.Common.RequestExtend, PF.Master.Modal(PF.Order_Manage.Admin_Manage.AnchorIntegral_Info, "{Order}[Admin](AnchorIntegral-Info)"));

//endregion

//region report-manage

router.get("/report-manage", CommonUtils.Common.RequestExtend, PF.Master.Main(PF.Report_Manage.Main, "{Report}"));

router.get("/report-manage/anchor-manage/day-list", CommonUtils.Common.RequestExtend, PF.Master.Main(PF.Report_Manage.Anchor_Manage.Day_List, "{Report}[Anchor](Day-List)"));
router.get("/report-manage/anchor-manage/month-list", CommonUtils.Common.RequestExtend, PF.Master.Main(PF.Report_Manage.Anchor_Manage.Month_List, "{Report}[Anchor](Month-List)"));

router.get("/report-manage/family-manage/month-list", CommonUtils.Common.RequestExtend, PF.Master.Main(PF.Report_Manage.Family_Manage.Month_List, "{Report}[Family](Month-List)"));

router.get("/report-manage/channel-manage/day-list", CommonUtils.Common.RequestExtend, PF.Master.Main(PF.Report_Manage.Channel_Manage.Day_List, "{Report}[Channel](Day-List)"));
router.get("/report-manage/channel-manage/strategy-day-list", CommonUtils.Common.RequestExtend, PF.Master.Main(PF.Report_Manage.Channel_Manage.Strategy_Day_List, "{Report}[Channel](Strategy-Day-List)"));

//endregion

//region base-manage

router.get("/base-manage", CommonUtils.Common.RequestExtend, PF.Master.Main(PF.Base_Manage.Main, "{Base}"));

router.get("/base-manage/log-manage/login-list", CommonUtils.Common.RequestExtend, PF.Master.Main(PF.Base_Manage.Log_Manage.Login_List, "{Base}[Log](Login-List)"));
router.get("/base-manage/log-manage/user-operation-list", CommonUtils.Common.RequestExtend, PF.Master.Main(PF.Base_Manage.Log_Manage.User_Operation_List, "{Base}[Log](User-Operation-List)"));
router.get("/base-manage/log-manage/anchor-operation-list", CommonUtils.Common.RequestExtend, PF.Master.Main(PF.Base_Manage.Log_Manage.Anchor_Operation_List, "{Base}[Log](Anchor-Operation-List)"));
router.get("/base-manage/log-manage/family-operation-list", CommonUtils.Common.RequestExtend, PF.Master.Main(PF.Base_Manage.Log_Manage.Family_Operation_List, "{Base}[Log](Family-Operation-List)"));
router.get("/base-manage/log-manage/admin-operation-list", CommonUtils.Common.RequestExtend, PF.Master.Main(PF.Base_Manage.Log_Manage.Admin_Operation_List, "{Base}[Log](Admin-Operation-List)"));

//endregion

module.exports = router;